.bin-steps {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  width: 100%;
  font-size: 0;
  line-height: 1.5;

  &-item {
    display: inline-block;
    position: relative;
    vertical-align: top;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    overflow: hidden;
    &:last-child {
      -webkit-box-flex: 0;
      -ms-flex: 0;
      flex: none;
    }

    &.bin-steps-status-wait {
      .bin-steps-head-inner {
        background-color: #fff;
        > .bin-steps-icon, span {
          color: var(--bin-color-text-disabled);
        }
      }
      .bin-steps-title {
        color: var(--bin-color-text-secondary);
      }
      .bin-steps-content {
        color: var(--bin-color-text-secondary);
      }
      .bin-steps-tail > i {
        background-color: var(--bin-border-color-base);
      }
    }
    &.bin-steps-status-process {
      .bin-steps-head-inner {
        border-color: var(--bin-color-primary);
        background-color: var(--bin-color-primary);
        > .bin-steps-icon, span {
          color: #fff;
        }
      }
      .bin-steps-title {
        color: var(--bin-color-text-primary);
      }
      .bin-steps-content {
        color: var(--bin-color-text-default);
      }
      .bin-steps-tail > i {
        background-color: var(--bin-border-color-base);
      }
    }
    &.bin-steps-status-finish {
      .bin-steps-head-inner {
        background-color: #fff;
        border-color: var(--bin-color-primary);
        > .bin-steps-icon, span {
          color: var(--bin-color-primary);
        }
      }
      .bin-steps-tail > i:after {
        width: 100%;
        background: var(--bin-color-primary);
        transition: var(--bin-animation-duration-base) ease-in-out;
        opacity: 1;
      }
      .bin-steps-title {
        color: var(--bin-color-text-secondary);
      }
      .bin-steps-content {
        color: var(--bin-color-text-secondary);
      }
    }
    &.bin-steps-status-success {
      .bin-steps-head-inner {
        background-color: #fff;
        border-color: var(--bin-color-success);
        > .bin-steps-icon {
          color: var(--bin-color-success);
        }
        span {
          color: var(--bin-color-success);
        }
      }
      .bin-steps-title {
        color: var(--bin-color-success);
      }
      .bin-steps-content {
        color: var(--bin-color-success);
      }
      .bin-steps-tail > i {
        background-color: var(--bin-border-color-base);
      }
    }

    &.bin-steps-next-success {
      .bin-steps-tail > i,
      .bin-steps-tail > i:after {
        background-color: var(--bin-color-success);
      }
    }

    &.bin-steps-status-error {
      .bin-steps-head-inner {
        background-color: #fff;
        border-color: var(--bin-color-danger);
        > .bin-steps-icon {
          color: var(--bin-color-danger);
        }
      }
      .bin-steps-title {
        color: var(--bin-color-danger);
      }
      .bin-steps-content {
        color: var(--bin-color-danger);
      }
      .bin-steps-tail > i {
        background-color: var(--bin-border-color-base);
      }
    }

    &.bin-steps-next-error {
      .bin-steps-tail > i,
      .bin-steps-tail > i:after {
        background-color: var(--bin-color-danger);
      }
    }

    &.bin-steps-custom {
      .bin-steps-head-inner {
        background: none;
        border: 0;
        width: auto;
        height: auto;
        > .bin-steps-icon {
          font-size: 20px;
          top: 2px;
          width: 20px;
          height: 20px;
        }
      }
      &.bin-steps-status-process {
        .bin-steps-head-inner > .bin-steps-icon {
          color: var(--bin-color-primary);
        }
      }
    }
  }
  &-item:last-child &-tail {
    display: none;
  }

  .bin-steps-head,
  .bin-steps-main {
    position: relative;
    display: inline-block;
    vertical-align: top;
  }
  .bin-steps-head {
    background: #fff;
  }

  .bin-steps-head-inner {
    display: block;
    width: 26px;
    height: 26px;
    line-height: 24px;
    margin-right: 8px;
    text-align: center;
    border: 1px solid var(--bin-color-text-disabled);
    border-radius: 50%;
    font-size: 14px;
    transition: background-color var(--bin-animation-duration-base) ease-in-out;

    > .bin-steps-icon {
      line-height: 1;
      position: relative;
      vertical-align: -1px;

      &.b-iconfont {
        font-size: 16px;
      }
      .icon-ios-checkmark-empty,
      .icon-ios-close-empty {
        font-weight: bold;
      }
    }
  }
  .bin-steps-main {
    margin-top: 2.5px;
    display: inline;
  }
  .bin-steps-custom .bin-steps-title {
    margin-top: 2.5px;
  }

  .bin-steps-title {
    display: inline-block;
    margin-bottom: 4px;
    padding-right: 10px;
    font-size: 14px;
    font-weight: bold;
    color: var(--bin-color-text-primary);
    background: #fff;

    > a:first-child:last-child {
      color: var(--bin-color-text-primary);
    }
  }
  .bin-steps-item-last {
    .bin-steps-title {
      padding-right: 0;
      width: 100%;
    }
  }
  .bin-steps-content {
    font-size: 12px;
    color: #999;
  }
  .bin-steps-tail {
    width: 100%;
    padding: 0 10px;
    position: absolute;
    left: 0;
    top: 13px;
    > i {
      display: inline-block;
      width: 100%;
      height: 1px;
      vertical-align: top;
      background: var(--bin-border-color-base);
      border-radius: 1px;
      position: relative;
      &:after {
        content: '';
        width: 0;
        height: 100%;
        background: var(--bin-border-color-base);
        opacity: 0;
        position: absolute;
        top: 0;
      }
    }
  }

  &.bin-steps-small {
    .bin-steps-head-inner {
      width: 18px;
      height: 18px;
      line-height: 16px;
      margin-right: 10px;
      text-align: center;
      border-radius: 50%;
      font-size: 12px;

      > .bin-steps-icon.b-iconfont {
        font-size: 12px;
        top: 0;
      }
    }
    .bin-steps-main {
      margin-top: 0;
    }
    .bin-steps-title {
      margin-bottom: 4px;
      margin-top: 0;
      color: var(--bin-color-text-primary);
      font-size: 12px;
      font-weight: bold;
    }
    .bin-steps-content {
      font-size: 12px;
      color: var(--bin-color-text-default);
      padding-left: 30px;
    }
    .bin-steps-tail {
      top: 8px;
      padding: 0 8px;
      > i {
        height: 1px;
        width: 100%;
        border-radius: 1px;
      }
    }
  }

  &.bin-steps-small .bin-steps-item.bin-steps-custom .bin-steps-head-inner,
  .bin-steps-item.bin-steps-custom .bin-steps-head-inner {
    width: inherit;
    height: inherit;
    line-height: inherit;
    border-radius: 0;
    border: 0;
    background: none;
  }
}

.bin-steps-vertical {
  display: block;
  .bin-steps-item {
    display: block;
    overflow: visible;
  }

  .bin-steps-tail {
    position: absolute;
    left: 13px;
    top: 0;
    height: 100%;
    width: 1px;
    padding: 30px 0 4px 0;
    > i {
      height: 100%;
      width: 1px;
      &:after {
        height: 0;
        width: 100%;
      }
    }
  }

  .bin-steps-status-finish {
    .bin-steps-tail > i:after {
      height: 100%;
    }
  }

  .bin-steps-head {
    float: left;
    &-inner {
      margin-right: 16px;
    }
  }

  .bin-steps-main {
    min-height: 47px;
    overflow: hidden;
    display: block;
    .bin-steps-title {
      line-height: 26px;
    }
    .bin-steps-content {
      padding-bottom: 12px;
      padding-left: 0;
    }
  }

  .bin-steps-custom .bin-steps-icon {
    left: 4px;
  }
  &.bin-steps-small .bin-steps-custom .bin-steps-icon {
    left: 0;
  }
}

.bin-steps-vertical.bin-steps-small {
  .bin-steps-tail {
    position: absolute;
    left: 9px;
    top: 0;
    padding: 22px 0 4px 0;
    > i {
      height: 100%;
    }
  }

  .bin-steps-title {
    line-height: 18px;
  }
}

.bin-steps-horizontal {
  &.bin-steps-hidden {
    visibility: hidden;
  }
  .bin-steps-content {
    //max-width: 100px;
    padding-left: 35px;
  }
  .bin-steps-item:not(:first-child) .bin-steps-head {
    padding-left: 10px;
    margin-left: -10px;
  }
}
